<form action="" method="post" id="attendance">
    @if($info)
    <div class="absence-work">
        <div class="weui-cells__title">
            <p class="yellow-p icon-change"><span class="cir-span"></span>缺勤</p>
        </div>
        <ul>
            <li class="clearfix">
                <label for="date">迟到</label>
                <input class="weui-switch" id="come-late" type="checkbox"  style="float: right;" name="late" value="1"  @if($info->late)checked @endif>
            </li>
            <li class="clearfix">
                <label for="date">早退</label>
                <input class="weui-switch" id="come-late" type="checkbox"  style="float: right;" name="early" value="1" @if($info->early)checked @endif>
            </li>
            <li class="clearfix">
                <label for="date">旷工</label>
                <input class="weui-switch" id="come-late" type="checkbox"  style="float: right;" name="absenteeism" value="1"    @if($info->absenteeism)checked @endif>
            </li>
            <li class="clearfix">
                <label class="input-label" for="leave-absence">事假</label>
                <input class="weui-input" id="leave-absence" type="text" value="{{$info->business or 0}}天" readonly="" name="business">
            </li>
            <li class="clearfix">
                <label class="input-label" for="sick-leave">病假</label>
                <input class="weui-input" id="sick-leave" type="text" value="{{$info->sick or 0}}天"  name="sick" readonly="">
            </li>

        </ul>
    </div>

    <div>
        <div class="weui-cells__title">
            <p class="blue-p icon-change"><span class="cir-span"></span>公假</p>
        </div>
        <div class="weui-flex cells_radio">
            <div class="weui-flex__item">
                <input class="radio" type="radio" name="public" value="1" @if($info->public==1)checked @endif>
                <label class="label"></label>
                <span>年假</span>
            </div>
            <div class="weui-flex__item">
                <input class="radio" type="radio" name="public" value="2" @if($info->public==2)checked @endif>
                <label class="label"></label>
                <span>婚假</span>
            </div>
            <div class="weui-flex__item">
                <input class="radio" type="radio" name="public" value="3" @if($info->public==3)checked @endif>
                <label class="label"></label>
                <span>其它</span>
            </div>
        </div>
    </div>

        <div>
            <div class="weui-cells__title">
                <p class="blue-p1 icon-change"><span class="cir-span"></span>出差</p>
            </div>
            <div class="weui-flex cells_radio">
                <div class="weui-flex__item">
                    <input class="radio" type="radio" name="chuchai" value="1" @if($info->chuchai==1)checked @endif>
                    <label class="label"></label>
                    <span class="label-live">出差</span>
                </div>
            </div>
        </div>
        <div>
            <div class="weui-cells__title">
                <p class="blue-p2 icon-change"><span class="cir-span"></span>其他</p>
            </div>
            <div class="weui-flex cells_radio">
                <div class="weui-flex__item">
                    <input class="radio" type="radio" name="qita" value="1" @if($info->qita==1)checked @endif>
                    <label class="label"></label>
                    <span class="label-other">其他</span>
                </div>
            </div>
        </div>


    <div class="overtime-work weui-cells__title">
        <p class="green-p"><sapn class="cir-span"></sapn>加班</p>
        <input class="weui-input" id="overtime-work" type="text" value="{{$info->overtime or 0}}小时"  name="overtime" readonly="" style="width: 68%;padding-right: 0.7rem;position:absolute;margin-top: 0;">
    </div>
    <div class="weui-cells weui-cells_form">
        <p class="cells__title">备注</p>
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <textarea class="weui-textarea" placeholder="请输入说明" rows="3" name="remark" >{{$info->remark}}</textarea>
            </div>
        </div>
    </div>
        @else
        <div class="absence-work">
            <div class="weui-cells__title">
                <p class="yellow-p icon-change"><span class="cir-span"></span>缺勤</p>
            </div>
            <ul>
                <li class="clearfix">
                    <label for="date">迟到</label>
                    <input class="weui-switch" id="come-late" type="checkbox"  style="float: right;" name="late" value="1"  >
                </li>
                <li class="clearfix">
                    <label for="date">早退</label>
                    <input class="weui-switch" id="come-late" type="checkbox"  style="float: right;" name="early" value="1" >
                </li>
                <li class="clearfix">
                    <label for="date">旷工</label>
                    <input class="weui-switch" id="come-late" type="checkbox"  style="float: right;" name="absenteeism" value="1"    >
                </li>
                <li class="clearfix">
                    <label class="input-label" for="leave-absence">事假</label>
                    <input class="weui-input" id="leave-absence" type="text" value="0天" readonly="" name="business">
                </li>
                <li class="clearfix">
                    <label class="input-label" for="sick-leave">病假</label>
                    <input class="weui-input" id="sick-leave" type="text" value="0天"  name="sick" readonly="">
                </li>

            </ul>
        </div>
        <div>
            <div class="weui-cells__title">
                <p class="blue-p icon-change"><span class="cir-span"></span>公假</p>
            </div>
            <div class="weui-flex cells_radio">
                <div class="weui-flex__item">
                    <input class="radio" type="radio" name="public" value="1">
                    <label class="label"></label>
                    <span>年假</span>
                </div>
                <div class="weui-flex__item">
                    <input class="radio" type="radio" name="public" value="2">
                    <label class="label"></label>
                    <span>婚假</span>
                </div>
                <div class="weui-flex__item">
                    <input class="radio" type="radio" name="public" value="3">
                    <label class="label"></label>
                    <span>其它</span>
                </div>
            </div>
        </div>


        <div>
            <div class="weui-cells__title">
                <p class="blue-p1 icon-change"><span class="cir-span"></span>出差</p>
            </div>
            <div class="weui-flex cells_radio">
                <div class="weui-flex__item">
                    <input class="radio" type="radio" name="chuchai" value="1" >
                    <label class="label"></label>
                    <span class="label-live">出差</span>
                </div>
            </div>
        </div>
        <div>
            <div class="weui-cells__title">
                <p class="blue-p2 icon-change"><span class="cir-span"></span>其他</p>
            </div>
            <div class="weui-flex cells_radio">
                <div class="weui-flex__item">
                    <input class="radio" type="radio" name="qita" value="1" >
                    <label class="label"></label>
                    <span class="label-other">其他</span>
                </div>
            </div>
        </div>

        <div class="overtime-work weui-cells__title">
            <p class="green-p"><span class="cir-span"></span>加班</p>
            <input class="weui-input" id="overtime-work" type="text" value="0小时"  name="overtime" readonly="" style="width: 68%;padding-right: 0.7rem;position:absolute;margin-top: 0;">
        </div>
        <div class="weui-cells weui-cells_form">
            <p class="cells__title">备注</p>
            <div class="weui-cell">
                <div class="weui-cell__bd">
                    <textarea class="weui-textarea" placeholder="请输入说明" rows="3" name="remark" ></textarea>
                </div>
            </div>
        </div>
    @endif
    <button class="weui-btn weui-btn_color submit-btn" type="button" onclick="ajax_attendance_update({{$id}})">提交</button>
</form>